package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import com.ticket.sass.common.entity.tenant.enums.LaterPayRefundRecordStatus;
import com.ticket.sass.common.entity.tenant.enums.LaterPayRefundRecordType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ywb
 * @since 2024-05-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("later_pay_refund_records")
@ApiModel(value="RefundApplyRecordsEntity对象", description="")
public class LaterPayRefundRecordEntity implements Serializable {
    /**
     * 申请时间限制开场 30 分钟内
     */
    public static final Integer TIME_LIMIT = 30;

    /**
     * 验证码失效时长（分）
     */
    public static final Integer VERIFY_CODE_INVALID_DURATION = 5;

    @ApiModelProperty(value = "退款申请记录ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "申请类型")
    private LaterPayRefundRecordType type;

    @ApiModelProperty(value = "申请内容")
    private String content;

    @ApiModelProperty(value = "订单ID")
    private Long orderId;

    @ApiModelProperty(value = "状态 1 待审核 2 通过 3 驳回/不通过")
    private LaterPayRefundRecordStatus status;

    @ApiModelProperty(value = "提示信息/驳回原因")
    private String message;
    
    @ApiModelProperty(value = "验证码")
    private String verifyCode;

    @ApiModelProperty(value = "验证码失效是时间")
    private LocalDateTime verifyCodeInvalidTime;

    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "影院ID")
    private Long cinemaId;

    @ApiModelProperty(value = "租户ID")
    private Long tenantId;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
    
    @TableLogic(value = "null", delval = "now()")
    @TableField(select = false)
    private LocalDateTime deletedAt;
}
